package com.li;

public class LeftStartSimilarStr {
    /**
     * 两个字符串从左到右是否相同
     *
     * @param firstStr
     * @param secondStr
     * @return
     */
    public static boolean leftStartSimilar(String firstStr, String secondStr) {
        boolean status = false;
        int length = secondStr.length();
        String tempStr = firstStr.substring(0, length);
        if (tempStr.equals(secondStr)) {
            status = true;
        }
        return status;
    }

    public static void main(String[] args) {
        System.out.println(leftStartSimilar("川A12345", "川A"));
    }
}
